package com.itheima.test3;

/**
 * @Author:gy
 * @Date: 2025/09/06 10:06
 * @Description:
 */
public class Demo {
    public static void main(String[] args) throws Exception {
        //类名.class
        Class s = Student.class;
        System.out.println(s);
        //对象名.getClass()
        Student student = new Student();
        Class<? extends Student> s1 = student.getClass();
        System.out.println(s1);
        //Class.forName(全类名);
        Class<?> s2 = Class.forName("com.itheima.test3.Student");
        System.out.println(s2);
        System.out.println(s==s1);
        System.out.println(s2==s1);
    }
}
